<div class="art-post">
    <div class="art-post-tl"></div>
    <div class="art-post-tr"></div>
    <div class="art-post-bl"></div>
    <div class="art-post-br"></div>
    <div class="art-post-tc"></div>
    <div class="art-post-bc"></div>
    <div class="art-post-cl"></div>
    <div class="art-post-cr"></div>
    <div class="art-post-cc"></div>
    <div class="art-post-body">
        <div class="art-post-inner art-article">
            <h2 class="art-postheader">[Danh sách tin tuyển dụng]</h2>
            <input type="button" value="Thêm tin mới"
                   onclick="window.location='<?php echo Utility::getSiteUrl();?>/recruitment/add'" style="height:30px">
            <br/><br/>

            <form action="<?php echo Utility::currentUrl(); ?>" method="post">
                <table class="item-list">
                    <thead>
                    <tr>
                        <th><a id="toggle-all"></a></th>
                        <th><a href="">Tiêu đề</a></th>
                        <th><a href="">Tác giả</a></th>
                        <th><a href="">Ngày viết</a></th>
                        <th><a href="">Trạng thái</a></th>
                        <th><a href="">Options</a></th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php
            $size = $data->getSize();
                    if($size > 0)
                    {
                    for($i = 0;$i < $size; $i++)
                    {
                    $row = $data->getRow($i);
                    ?>
                    <tr>
                        <td><input type="checkbox" name="cb[]" value="<?php echo $row->id; ?>"/></td>
                        <td style="padding-left:5px;padding-right:5px"><a
                            href="<?php echo Utility::getSiteUrl() . '/post/edit/' . $row->id;?>"
                            title="Sửa"><strong><?php echo $row->title; ?></strong></a></td>
                        <td><?php echo $row->username; ?></td>
                        <td><?php echo date('d-m-Y H:i:s',strtotime($row->p_date)); ?></td>
                        <td style="font-weight:bold;"><?php echo ($row->status == 1 ? "<font color=\"green\"> Hiển
                            thị</font>" : "<font color=\"red\">Không hiển thị</font>"); ?>
                        </td>
                        <td>
                            <a href="<?php echo Utility::getSiteUrl() . '/recruitment/edit/' . $row->id;?>" title="Sửa"
                               class="icon-edit"></a>
                            <a href="<?php echo Utility::getSiteUrl() . '/recruitment/remove/' . $row->id;?>" title="Xóa"
                               class="icon-remove"></a>
                        </td>
                    </tr>
                    <?php
                }
                ?>
                    <tr>
                        <td colspan="6" style="text-align: right">
                            <select name="mass_action">
                                <option value="">Chọn hành động</option>
                                <option value="remove">Xóa</option>
                            </select>
                            <input type="submit" name="submit" value="Thực hiện"/>
                        </td>
                    </tr>
                    <?php
            }
            else
            {
                ?>
                    <tr>
                        <td colspan="6" style="color:red;font-weight:bold">Chưa có bài viết nào</td>
                    </tr>
                    <?php
            }
            ?>
                    </tbody>
                </table>
            </form>
        </div>

        <div class="cleared"></div>
    </div>
</div>